package com.sync.syncmasterdata;


import com.fasterxml.jackson.databind.ObjectMapper;
import com.sync.syncmasterdata.dingrobot.controller.DingController;
import com.sync.syncmasterdata.dingrobot.pojo.DingMsg;
import com.sync.syncmasterdata.dingrobot.service.DingAPIService;
import com.sync.syncmasterdata.dingrobot.service.DingRobotService;
import com.sync.syncmasterdata.dingtask.service.DingTaskService;
import com.sync.syncmasterdata.dingtask.service.DingTaskUtil;
import com.sync.syncmasterdata.product.entity.wms.EleProduct;
import com.sync.syncmasterdata.product.pojo.cp.InventoryForCP;
import com.sync.syncmasterdata.product.pojo.oa.InventoryForOA;
import com.sync.syncmasterdata.product.service.SyncInventoryService;
import com.sync.syncmasterdata.product.service.convert.ProductOAtoCP;
import com.sync.syncmasterdata.product.service.convert.ProductOAtoWms;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.*;

@SpringBootTest
@Slf4j
class SyncMasterDataApplicationTestsDingTask {

    @Autowired
    private DingTaskService dingTaskService;

    @Autowired
    private DingRobotService dingRobotService;

    @Autowired
    private DingAPIService dingAPIService;

    @Autowired
    private DingTaskUtil taskUtil;

    @Test
    void contextLoads() {
    }

    /**
     * 钉钉任务推送测试
     */
    @Test
    public void interfaceTestDing() {
        String unionid = dingTaskService.getDingUnionidByPhone("15267167276");
        dingTaskService.createTask(unionid,null);
    }

    @Test
    public void test2() {
        dingRobotService.simpleDingSendMsg("123",new String[]{"15267167276"});
    }

}
